/*
块文件日志
*/

#pragma once

#include "file_loger.hpp"

namespace lxz
{
    class chunk_file_loger : public file_loger
    {
    public:
        chunk_file_loger();
        ~chunk_file_loger();

        virtual int32_t init(log_level level, const char *file) override;

    protected:
        virtual void flush(void) override;

    private:
        void GenerateFilename(void);

        std::string path_;
        std::string filename_;

        const size_t bytes_per_file_;
    };

}